﻿<UserControl x:Class="StockholmsStad.Windows.UI.Infrastructure.Controls.CustomDatePicker2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dateControls="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.DateControls;assembly=J832.Wpf.BagOTricksLib"
    xmlns:converters="clr-namespace:StockholmsStad.Windows.UI.Infrastructure.Converters"
    Height="20" MinWidth="120"
    x:Name="control">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>

        <TextBox Grid.Column="0" x:Name="tbText" MaxLength="10" /> <!--  KeyUp="tbText_KeyUp"   Text="{Binding ElementName=control, Path=DateValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"-->

        <Grid Grid.Column="1" Margin="3,0,0,0">
            <Image Source="calendar2.png" Cursor="Hand"  />   <!--MouseLeftButtonDown="openPopup_Click"-->

            <Popup x:Name="popupControl" PlacementRectangle="0, 0, 0 ,0" StaysOpen="False" Grid.Column="1">
                <Grid>
                    <dateControls:MonthCalendar x:Name="dateControl" /> <!-- DateSelectionChanged="MonthCalendar_DateSelectionChanged"    SelectedDate="{Binding ElementName=control, Path=DateValue, Mode=TwoWay, Converter={StaticResource dateTimeStringConverter}}"-->
                </Grid>
            </Popup>
        </Grid>
        
        
           
    </Grid>
</UserControl>
